package com.springcloudalibaba.buyerOrder.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 订单信息
 * </p>
 *
 * @author lixing_java@163.com
 * @since 2021-11-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("buyer_order")
public class BuyerOrderEntity implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using= ToStringSerializer.class)
    private Long id;

    /**
     * 订单编码
     */
    @TableField("code")
    private String code;

    /**
     * 买家账号
     */
    @TableField("create_user")
    private String createUser;

    /**
     * 购买时间
     */
    @TableField("create_time")
    private Date createTime;

    /**
     * 购买商品的id
     */
    @TableField("product_id")
    private Integer productId;

    /**
     * 支付状态（1：支付中 2：支付成功 3：支付失败）
     */
    @TableField("pay_state")
    private Integer payState;


}
